﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Time.IDAL;
using Time.IBLL;
using Time.DAL;
using System.Data;
namespace Time.BLL
{
  public  class EqAlarm_BLL:IEqAlarm_BLL
    {
      IEqAlarm_DAL IEqAlarm_DAL;
      public EqAlarm_BLL()
      {
            IEqAlarm_DAL = new EqAlarm_DAL();
        }

      public   EqAlarm_BLL(string bsType)
      {
          IEqAlarm_DAL= new EqAlarm_DAL(bsType);
      }
      public   int ExecuteNonQuery(string DestBsType, string strSql, string[,] Option)
        {
            return IEqAlarm_DAL.ExecuteNonQuery(DestBsType, strSql,  Option);
        }
        /// <summary>
        /// 提交AQL执行语句
        /// </summary>
        /// <param name="strSql"></param>
        /// <param name="Option"></param>
        /// <returns></returns>
        public int ExecuteNonQuery(string strSql, string[,] Option)
        {
            return IEqAlarm_DAL.ExecuteNonQuery(strSql, Option);
        }
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <returns></returns>
        public  DataTable getData(string sqlStr)
        {
            return IEqAlarm_DAL.getData(sqlStr);
        }
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <returns></returns>
        public DataTable getDataTable(string tableName)
      {
          return IEqAlarm_DAL.getDataTable(tableName);
      }
      public DataTable getDataTableByMap(string tableName, string field,string orderInfo,string BSType)
      {
           return IEqAlarm_DAL.getDataTableByMap(tableName,field,orderInfo, BSType);
      }
      public DataTable getTableObj()
      {
          return IEqAlarm_DAL.getTableObj();
      }
        /// <summary>
        /// 数据插入到test,不删除数据源
        /// </summary>
        /// <param name="objDt">数据表</param>
        /// <returns></returns>
        public int MoveData(string TableName,DataTable objDt)
        {
            return IEqAlarm_DAL.MoveData(TableName,objDt);
        }
        public int MoveDataByMap(string DestBsType, string STableName, string DTableName, DataTable objDt, string[] SourceFieldArr, string[] DestFieldArr)
        {
            return IEqAlarm_DAL.MoveDataByMap(DestBsType, STableName, DTableName, objDt, SourceFieldArr, DestFieldArr);
        }
      /// <summary>
      /// 转移数据后删除数据源
      /// </summary>
      /// <param name="TableName"></param>
      /// <param name="objDt"></param>
      /// <returns></returns>
        public int MoveDataAndDelete(string TableName, DataTable objDt)
        {
            return IEqAlarm_DAL.MoveDataAndDelete(TableName, objDt);
        }
        public int MoveDataMapAndDelete( string STableName, string DTableName, DataTable objDt, string[] SourceFieldArr, string[] DestFieldArr)
         {
             return IEqAlarm_DAL.MoveDataMapAndDelete(STableName,DTableName,objDt,SourceFieldArr,DestFieldArr);
        }
    }
}
